﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Cart.ascx.cs" Inherits="usercontrol_Cart" %>
  <div class="title"><span class="title_icon"><img src="images/cart.gif" alt="" title="" /></span>Giỏ hàng:</div>
  <br />
  <br />
   <asp:Label ID="lbThongBao" 
           runat="server" Font-Bold="True" Font-Italic="True" ForeColor="Red"></asp:Label>    
        	<div class="feat_prod_box_details">
            
 
            
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    DataKeyNames="IdSach" onrowdeleting="GridView1_RowDeleting" 
                    onrowupdating="GridView1_RowUpdating" ShowFooter="True" Width="100%" 
                    onrowcancelingedit="GridView1_RowCancelingEdit" 
                    onrowediting="GridView1_RowEditing">
                    
                    <Columns>
                    <asp:TemplateField HeaderText="">
                            <ItemTemplate>
                                <asp:Image ID="imgSach" runat="server" ImageUrl='<%#"../images/"+Eval("HinhSach") %>' Width="30" Height="40" />
       
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Sản Phẩm">
                            <ItemTemplate>
                              
                                <asp:Label ID="lblTenSP" runat="server" Text='<%# Bind("TenSach") %>' Width="100"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Giá Tiền">
                            <ItemTemplate>
                                <asp:Label ID="lblGiaTien" runat="server" Text='<%# Bind("GiaSach") %>' Width="84"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Số Lượng">
                            <FooterTemplate>
                                Tổng tiền:            
                            </FooterTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lbSoLuong" runat="server" Text='<%# Bind("SoLuong") %>' Width="50px"></asp:Label>
                                
              
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="txtSoLuong" runat="server" Height="15px" 
                                    Text='<%# Bind("SoLuong") %>' Width="50px"></asp:TextBox>
                            </EditItemTemplate>
                        </asp:TemplateField>
                         <asp:TemplateField HeaderText="">
                           
                            <ItemTemplate>
  
                                 <asp:Label ID="lblTonkho" runat="server" Text='<%#"/"+ Eval("TonKho") %>' Width="30" ></asp:Label>   
                            
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Tổng Tiền">
                            <FooterTemplate>
                                <asp:Label ID="lblThanhTien" runat="server" Text='<%#lblThanhTienValue() %>'>lblThanhTien</asp:Label>
                            </FooterTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblTongTien" runat="server" Text='<%# Bind("ThanhTien") %>' Width="70"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                    <asp:TemplateField HeaderText="" ShowHeader="False" HeaderStyle-HorizontalAlign="Left"> 
                         <EditItemTemplate> 
                            <asp:LinkButton ID="lbkUpdate" runat="server" CausesValidation="False" CommandName="Update" Text="Sửa"></asp:LinkButton> 
                            <asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="False" CommandName="Cancel" Text="Thoát"></asp:LinkButton> 
                        </EditItemTemplate> 
                        
                        <ItemTemplate> 
                            <asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="False" CommandName="Edit" Text="Sửa"></asp:LinkButton> 
                        </ItemTemplate> 
                    </asp:TemplateField> 
                    <asp:TemplateField >
                        <EditItemTemplate></EditItemTemplate>
                        <ItemTemplate>
                            <asp:LinkButton ID="lnkDelete" runat="server" CausesValidation="false" CommandName="Delete" Text="Xóa"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                        
                       <%-- <asp:ButtonField CommandName="Update" Text="Sửa" />--%>
                       <%-- <asp:ButtonField CommandName="Delete" Text="Xóa" />--%>
                    </Columns>
                    
                </asp:GridView>
            <div class="continue">
                <asp:Button ID="btContinue" runat="server" 
                    Text="&lt;&lt; Tiếp tuc mua" onclick="btContinue_Click" /></div>
            <div class="checkout">
                <asp:Button ID="btCheckout" runat="server" 
                    Text="Thanh toán &gt;&gt;" onclick="btCheckout_Click" /></div>
            </div>	
            
       
        <div class="clear"></div>